---
title: Large Dataset Performance
nav_title: Large Dataset
tags: demo
---


{% from "demo.njk" import demo %}


{% set label %}
<label class="h2 mb-3">
	Performance
</label>
<p>This shows how it performs with 15,000 items.</p>{% endset %}

{% set html %}
<select id="select-junk" placeholder="Start Typing..."></select>
{% endset %}

<script>
{% set script %}
var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV';
var options = [];
for (var i = 0; i < 15000; i++) {
	var title = [];
	for (var j = 0; j < 8; j++) {
		title.push(letters.charAt(Math.round((letters.length - 1) * Math.random())));
	}
	options.push({
		id: i+'-'+title.join(''),
		title: title.join('')
	});
}

new TomSelect('#select-junk',{
	maxItems: null,
	maxOptions: 100,
	valueField: 'id',
	labelField: 'title',
	searchField: 'title',
	sortField: 'title',
	options: options,
	create: false
});
{% endset %}
</script>

{{ demo( label, html, script) }}
